<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Remove pdf</title>
</head>

<body>
<?php 
header("Content-type: text/html;Charset=UTF-8");//Encoding declaration
header("Cache-Control:no-cache,must-revalidate");//Declaration does not cache

?>

<form action="<?php echo site_url('manage/update_book_basic'.'/'.$b_id)?>" name="step_one" method="post" enctype="multipart/form-data">
	<table border="1">
		<tr><td>App Store Id:</td><td><input type="text" name="prod_id" id="prod_id" value="<?php echo $msg['pid']?>" /></td></tr>
		<tr><td>ISBN:</td><td ><input type="text" name="isbn" id="isbn" value="<?php echo $msg['isbn']?>" /></td></tr>
		<tr><td>Book Name:</td><td ><input type="text" name="name" id="name" value="<?php echo $msg['bn']?>" /></td></tr>
		<tr><td>Author:</td><td ><input type="text" name="author" id="author" value="<?php echo $msg['au']?>"/></td></tr>
		<tr><td>Publisher:</td><td ><input type="text" name="publisher" id="publisher" value="<?php echo $msg['pn']?>"/></td></tr>
		<tr><td>Price:</td><td ><input type="text" name="price" id="price" value="<?php echo $msg['pc']?>"/></td></tr>
		<tr><td>Publish Time:</td><td ><input type="text" name="ptime" id="ptime" value="<?php echo $msg['pd']?>"/></td></tr>
		<tr><td>Book Description:</td><td ><textarea name="describe" rows="15" cols="90" ><?php echo $msg['bd']?></textarea></td></tr>
		<tr>
			<td>Select Category:</td>
			<td >
			<?php 
			if($slave!='')
			{
				foreach ($cate as $cate_msg)
				{
				 $p=0;
				 foreach($slave as $sl)
				 {
				 	if($cate_msg['cate_id']==$sl['type_id'])
				 	{
				 	$p=1;
				 	}
				 }
				 if ($p==0)
				 {
				 	echo "<input type=\"checkbox\" name=\"category[]\" value=\"".$cate_msg['cate_id']."\" />".$cate_msg['bc'];
				 }
				 elseif($p==1)
				 {
				 	echo "<input type=\"checkbox\" name=\"category[]\" value=\"".$cate_msg['cate_id']."\" checked=\"checked\"/>".$cate_msg['bc'];
				 }
				}
			}
			else 
			{
				foreach ($cate as $cate_msg)
				{
					echo "<input type=\"checkbox\" name=\"category[]\" value=\"".$cate_msg['cate_id']."\" />".$cate_msg['bc'];
				}
			}	
			?>
			
			</td>
		</tr>
		<tr>
		<td>Star:</td>
		<td >
			<?php 
			$radio=array(
				array('val'=>'1','show'=>'One'),
				array('val'=>'2','show'=>'Two'),
				array('val'=>'3','show'=>'Three'),
				array('val'=>'4','show'=>'Four'),
				array('val'=>'5','show'=>'Five'),
			);
			foreach($radio as $radio_msg)
			{
				if($radio_msg['val']==$msg['star'])
				{
					echo "<input checked=\"checked\" type=\"radio\" name=\"star\" value=\"".$radio_msg['val']."\"/>".$radio_msg['show'];
				}
				else 
				{
					echo "<input type=\"radio\" name=\"star\" value=\"".$radio_msg['val']."\"/>".$radio_msg['show'];			
				}
				
			}
			
			?>
		</td>
		</tr>
		<tr><td><input type="submit" name="submit" id="submit" value="submit"/></td><td ><input type="reset" name="reset" id="reset" value="reset"/></td></tr>	
	</table>

</form>
</body>
</html>
